When a computer program package is uninstalled, the computer system on which the computer program has been installed is modified to attempt to return the computer system to a state where the files that were present on the system before the computer program package was installed are again present on the system in their original form. Many conventional computer program packages include a limited ability to uninstall themselves. A first approach to uninstalling computer program packages that has been adopted by conventional systems has been to maintain a hard-coded list of directories that are manipulated by the installation program of the computer program package. All of the directories on the list are backed up (i.e., stored on secondary storage) so that if the user wishes to later uninstall the computer program package, the directories that have been backed up may be rewritten on the computer system. A substantial drawback of this approach is that the backed up directories occupy a substantial amount of secondary storage space.
Another alternative approach to uninstalling a computer program package that has been adopted by conventional systems has been to delete all files associated with the computer program package. Unfortunately, this can have deleterious effects because certain unintended files may be deleted. For example, if the computer system on which the computer program package is installed has a first version of a computer program package stored on secondary storage and the computer system is installing a second version of the same computer program package, this uninstalling approach may result in the deletion of both versions of the computer program package. Moreover, this approach may delete files that are shared and used by other computer programs.